<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        li{
            margin-top:5px;
        }
        .psd{
            display: none;
        }
        body{
            user-select:none;
        }
    </style>
</head>
<body>
    <h1>Post Requestion</h1>
    <ul>
        <li>姓名:{{info.name}}</li>
        <li>性别:{{info.sex}}</li>
        <li>年龄:{{info.age}}</li>
        <li>个人介绍:{{info.intro}}</li>
        <li>账号：{{info.account}}</li>
        <li class="passwordItem">密码：
            <span class="psd">{{info.password}}</span>
            <span>{{info.star}}</span>
        </li>
    </ul>

    <script>
        const li = document.querySelector('.passwordItem');
        const psd = document.querySelectorAll('span')[0];
        const star = document.querySelectorAll('span')[1];
        let flag = false;
        li.onclick = function(){
            if(!flag){
                psd.className = "";
                star.className = "psd";
                flag = !flag;
            }else{
                psd.className = "psd";
                star.className = "";
                flag = !flag;
            }
        }
    </script>
</body>
</html>